package com.winshare.saleAssistant.domain.dto.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@ApiModel
public class ProductCreateDTO {

    @NotNull(message = "产品分类主键不可以为空")
    @Range(min = 1, message = "产品分类主键必须大于0")
    @ApiModelProperty(value = "产品分类主键不可以为空")
    private Integer productCategoryId;

    @NotBlank(message = "产品分类名称不可以为空")
    @Length(min = 1, max = 80, message = "产品分类名称长度需要在1-80个字之间")
    @ApiModelProperty(value = "产品分类名称")
    private String productCategoryName;

    @NotBlank(message = "产品名称不可以为空")
    @Length(min = 1, max = 80, message = "产品名称长度需要在1-100个字之间")
    @ApiModelProperty(value = "产品名称")
    private String productName;

    @NotBlank(message = "产品编码不可以为空")
    @Length(min = 1, max = 50, message = "产品编码长度需要在1-100个字之间")
    @ApiModelProperty(value = "产品编码")
    private String productCode;

    @ApiModelProperty(value = "销售区域")
    private String saleArea;

    @ApiModelProperty(value = "产品内容")
    private String productContent;

    @ApiModelProperty(value = "产品排序")
    private Integer sort;

    @Length(min = 0, max = 150, message = "产品缩略图url长度需要在1-150个字之间")
    @ApiModelProperty(value = "产品缩略图url")
    private String imageUrl;

    /**
     * 是否跳转其他小程序 1=否，2=是
     */
    @ApiModelProperty(value = "是否跳转其他小程序 1=否，2=是")
    private Integer type;
    /**
     * 其他小程序APPid
     */
    @ApiModelProperty(value = "其他小程序APPid")
    private String appId;

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public ProductCreateDTO() {
    }

    public Integer getProductCategoryId() {
        return productCategoryId;
    }

    public void setProductCategoryId(Integer productCategoryId) {
        this.productCategoryId = productCategoryId;
    }

    public String getProductCategoryName() {
        return productCategoryName;
    }

    public void setProductCategoryName(String productCategoryName) {
        this.productCategoryName = productCategoryName;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getSaleArea() {
        return saleArea;
    }

    public void setSaleArea(String saleArea) {
        this.saleArea = saleArea;
    }

    public String getProductContent() {
        return productContent;
    }

    public void setProductContent(String productContent) {
        this.productContent = productContent;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }
}
